// 使用filter进行数组去重
const numbers = [1, 1, 23, 45, 67, 434, 2, 3, 4, 5, 63, 2, 3, 4, 2];
const unique = (arr) => {
  return arr.filter((item, index) => {
    return arr.indexOf(item) === index;
  });
};
console.log(unique(numbers));
// [ 1, 23, 45, 67, 434, 2,  3,  4,  5,  63 ]
